package com.myhome.money.ssm.springmvc.service;

import com.alibaba.nacos.api.config.annotation.NacosValue;
import org.springframework.stereotype.Service;

/**
 * @Author: 许路路
 * @Date: 2019/1/7
 */
@Service
public class DemoService {

    @NacosValue(value = "${hello:12345}", autoRefreshed = true)
    private String hello;

    @NacosValue(value = "${useLocalCache:false}", autoRefreshed = true)
    private boolean useLocalCache;

    public String hello(String name) {
        return "hello service:" + name + ";result:" + hello + ";cache:" + useLocalCache;
    }

    public String getHello() {
        return hello;
    }

    public void setHello(String hello) {
        this.hello = hello;
    }

    public boolean isUseLocalCache() {
        return useLocalCache;
    }

    public void setUseLocalCache(boolean useLocalCache) {
        this.useLocalCache = useLocalCache;
    }
}
